<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page language="java" import="com.tjtt.common.utils.DateUtilsAll"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String mainid = request.getParameter("mainid");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base target="_self"/>
    <link rel="stylesheet" type="text/css" href="<%=path %>/web/style/layout.css" />
    <script type="text/javascript" src="<%=path %>/jqGrid/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="<%=path %>/jslib/jquery.validate.min.js"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/My97DatePicker/WdatePicker.js" defer="defer"></script>
    <script type='text/javascript' src="<%=request.getContextPath() %>/jslib/jquery.form.js"></script>
    <script type="text/javascript" src="<%=request.getContextPath() %>/jslib/additional-methods.js"></script>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/demo.css">
	<script type="text/javascript" src="<%=request.getContextPath() %>/jslib/jquery-easyui-1.4.1/jquery.easyui.min.js"></script>
    <c:if test="${requestScope.message!=null}">
		<script type="text/javascript">
 	 		     alert('<c:out value="${requestScope.message}"></c:out>');
 	 		     window.close();
 		</script>
	</c:if>
		
  </head>
  	<script type="text/javascript">
  		var api = frameElement.api, W = api.opener;
    var stateValue="";
    $().ready(function(){
			var options = {
		  	    url:'<%=request.getContextPath() %>/shebeitouruAction!sheiBeiFlowFaqi.action',
		  	     beforeSubmit: function() {
		   				return true;
		    			},
		  	    dataType:'json',
		  	    success: function(data) {
		  	      if(data.result=='success'){
					alert("提交成功");
					api.close();
					W.refreshIt();
		  	      }
		  	    }};
		$('#saveBtn').click(function(){
			    	$('#pageFrom').ajaxSubmit(options);
	 	            return false;
    	 });
    	$('#closeBtn').click(function(){
    		api.close();
			//window.close();
		});
		
	});
		
		/* function checking(){
	   		var flag = true;
			var shebeiname = $("#biaozhihao").val();
			var shenqingbumen = $("#shenqingbumen").val();
			var shenqingren = $("#shenqingren").val();
			var shenqingtime = $("#shenqingtime").val();
			var xuhao = $("#xuhao").val();
			var xiangmuname = $("#xiangmuname").val();
			var shuliang = $("#shuliang").val();
			var yujiaofutime = $("#yujiaofutime").val();
			var xiangmufuzeren = $("#xiangmufuzeren").val();
			var lianxifangshi = $("#lianxifangshi").val();
			var zhuzelingdao = $("#zhuzelingdao").val();
			var xianyouequ = $("#xianyouequ").val();
			var yuanyinmiaoshu = $("#yuanyinmiaoshu").val();
			if(biaozhihao ==null || biaozhihao == "" ){
				alert("标识号不能为空！");
				$("#biaozhihao").focus();
	    		return false;
			}
			if(shenqingbumen == null && shenqingbumen == ""){
				alert("部门不能为空！");
				$("#shenqingbumen").focus();
	    		return false;
			}
			if(shenqingren == null && shenqingren == ""){
				alert("申请人不能为空！");
				$("#shenqingren").focus();
	    		return false;
			}
			if(shenqingtime ==null || shenqingtime == "" ){
				alert("申请时间不能为空！");
				$("#shenqingtime").focus();
	    		return false;
			}
			if(xuhao == null && xuhao == ""){
				alert("序号不能为空！");
				$("#xuhao").focus();
	    		return false;
			}
			if(xiangmuname == null && xiangmuname == ""){
				alert("项目名称不能为空！");
				$("#xiangmuname").focus();
	    		return false;
			}
			if(shuliang ==null || shuliang == "" ){
				alert("数量不能为空！");
				$("#shuliang").focus();
	    		return false;
			}
			if(yujiaofutime == null && yujiaofutime == ""){
				alert("预交付时间不能为空！");
				$("#yujiaofutime").focus();
	    		return false;
			}
			if(xiangmufuzeren == null && xiangmufuzeren == ""){
				alert("项目负责人不能为空！");
				$("#xiangmufuzeren").focus();
	    		return false;
			}
			if(lianxifangshi ==null || lianxifangshi == "" ){
				alert("联系方式不能为空！");
				$("#lianxifangshi").focus();
	    		return false;
			}
			if(zhuzelingdao == null && zhuzelingdao == ""){
				alert("主责领导不能为空！");
				$("#zhuzelingdao").focus();
	    		return false;
			}
			if(xianyouequ == null && xianyouequ == ""){
				alert("现有设备情况不能为空！");
				$("#xianyouequ").focus();
	    		return false;
			}
			if(yuanyinmiaoshu == null && yuanyinmiaoshu == ""){
				alert("原因描述不能为空！");
				$("#yuanyinmiaoshu").focus();
	    		return false;
			}
		} */
		
    		
  	</script>
  <body>
    <form id="pageFrom" action="" enctype="multipart/form-data" method="post">
        <input type="hidden" id="flag" name="flag" />
        
        <input type="hidden" name="flowid" id="flowid" value="${flowid}">
     	<input type="hidden" name="stateid" id="stateid" value="${stateid}">
     	${steptcontent}
     	<input type="hidden" name="touruid" id="touruid" value="${requestScope.id}">
     	
  		<table width="100%" border="0" align="center" cellpadding="5" cellspacing="5" class="formTableNew" style="padding-top: 20px">
  			 <tr>
			  <td align="right">流程名称:</td>
     		<td>
     		<script>
     		  	document.write('<input type="text" id="flowname" name="flowname" maxlength="50" value="设备投入流程" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;">');
     		</script>
     		<img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img></td>
  			</tr>
  			<tr>
  			  <td align="right">标识号：</td>
  			  <td align="left">
  			    <input  type="text" id="biaozhihao" maxlength="50" name="biaozhihao" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			  <td align="right">申请部门：</td>
  			  <td align="left">
  			    <input  type="text" id="shenqingbumen" maxlength="50" name="shenqingbumen" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="<%=session.getAttribute("ORG_NAME") %>" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">申请人：</td>
  			  <td align="left">
  			    <input  type="text" id="shenqingren" maxlength="50" name="shenqingren" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="<%=session.getAttribute("username") %>" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			  <td align="right">申请时间：</td>
  			  <td align="left">
  			    <input  type="text" id="shenqingtime" maxlength="50" name="shenqingtime" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;" onChange="changeDate()" onClick="WdatePicker({maxDate:new Date()})" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="<%=DateUtilsAll.dateToStringShort(new Date()) %>" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">序号：</td>
  			  <td align="left">
  			    <input  type="text" id="xuhao" maxlength="50" name="xuhao" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			  <td align="right">项目名称：</td>
  			  <td align="left">
  			    <input  type="text" id="xiangmuname" maxlength="50" name="xiangmuname"  style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">数量：</td>
  			  <td align="left">
  			    <input  type="text" id="shuliang" maxlength="50" name="shuliang" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			  <td align="right">预交付日期：</td>
  			  <td align="left">
  			    <input  type="text"  id="yujiaofutime" maxlength="50" name="yujiaofutime" onClick="WdatePicker()" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">项目负责人：</td>
  			  <td align="left">
  			    <input  type="text" id="xiangmufuzeren" maxlength="50" name="xiangmufuzeren" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			    <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			  <td align="right">联系方式：</td>
  			  <td align="left">
  			  	 <input  type="text" id="lianxifangshi" maxlength="50"  name="lianxifangshi" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			  	 <img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">主责领导</td>
  			  <td align="left">
  			    <input  type="text" id="zhuzelingdao" maxlength="50" name="zhuzelingdao" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			  	<img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			  <td align="right">现有设备使用情况：</td>
  			  <td align="left">
  			    <input  type="text" id="xianyouequ" maxlength="50" name="xianyouequ" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			 	<img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			</tr>
  			<tr>
  			  <td align="right">原因描述:</td>
  			  <td align="left">
  			    <input  type="text"  id="yuanyinmiaoshu"  maxlength="50" name="yuanyinmiaoshu" style="border: 1px solid #999;padding: 5px;width: 250px;height:25px;"  value="" />
  			  	<img src="<%=request.getContextPath() %>/images/xh.png" align="absmiddle"></img>
  			  </td>
  			  <td align="right">附件：</td>
  			  <td align="left">
  			  	<jsp:include page="../fileupload/attachment.jsp?id=${requestScope.id }&column=fujian&show=n" ></jsp:include>
  			  </td>
  			</tr>
		</table>
		<table width="100%" border="0" align="center" class="formTableNew">
		  <tr>   
			<td align="center">
		    	<input id="saveBtn" type="button" value="提 交" class="form_bt_orange" />
		    	<input type="button" id="closeBtn" value="取 消" class="form_bt_grey" />
		    </td>
		  </tr>
		</table>
	<!--表单结束-->
	</form>
  </body>
</html>
